package GUI;

import java.awt.Color;
import java.awt.event.ActionListener;

import javax.swing.JComboBox;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.Font;

/**
 * The Class SendPermissionRequestGUI.
 * Boundary for sending permission to customer activity
 */
public class SendPermissionRequestGUI extends AbstractPanelGUI {

	/** The customers combo box. */
	private JComboBox<String> customersCb;
	
	/** The button back. */
	private JButton btnBack;
	
	/** The button send request. */
	private JButton btnSendRequest;
	
	/** The label customers. */
	private JLabel lblCustomers;
	
	/** The label product. */
	private JLabel lblProduct;
	
	/** The products combo box. */
	private JComboBox<String> productsCb;
	
	/**
	 * Instantiates a new send permission request gui.
	 */
	public SendPermissionRequestGUI() {
		
		setBackground(Color.RED);
		initialize();

	}

	/* (non-Javadoc)
	 * @see GUI.AbstractPanelGUI#initialize()
	 */
	@Override
	public void initialize() {
		setLayout(null);
		setSize(Width,Height);
		
		customersCb = new JComboBox<String>();
		customersCb.setBounds(163, 63, 153, 22);
		add(customersCb);
		
		btnSendRequest = new JButton("Send Request");
		btnSendRequest.setBounds(163, 226, 153, 29);
		add(btnSendRequest);
		
		btnBack = new JButton("Back");
		btnBack.setBounds(39, 304, 89, 23);
		add(btnBack);
		
		lblCustomers = new JLabel("Customers:");
		lblCustomers.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblCustomers.setBounds(195, 38, 80, 17);
		add(lblCustomers);
		
		lblProduct = new JLabel("Products:");
		lblProduct.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblProduct.setBounds(208, 122, 67, 17);
		add(lblProduct);
		
		productsCb = new JComboBox<String>();
		productsCb.setBounds(163, 150, 153, 20);
		add(productsCb);
		
		
		
	}
	
	/**
	 * Adds action listener to back button.
	 *
	 * @param listener the listener
	 */
	public void addBackListener(ActionListener listener)
	{
		btnBack.addActionListener(listener);
	}
	
	/**
	 * Adds action listener to send request button.
	 *
	 * @param listener the listener
	 */
	public void addSendRequestListener(ActionListener listener)
	{
		btnSendRequest.addActionListener(listener);
	}
	
	/**
	 * Gets the customers combo box.
	 *
	 * @return the customers combo box
	 */
	public JComboBox<String> getCustomersCb() {
		return customersCb;
	}
	

	/**
	 * Gets the button send request.
	 *
	 * @return the button send request
	 */
	public JButton getBtnSendRequest() {
		return btnSendRequest;
	}

	/**
	 * Sets the button send request.
	 *
	 * @param btnSendRequest the new button send request
	 */
	public void setBtnSendRequest(JButton btnSendRequest) {
		this.btnSendRequest = btnSendRequest;
	}

	/**
	 * Gets the products combo box.
	 *
	 * @return the products combo box
	 */
	public JComboBox<String> getProductsCb() {
		return productsCb;
	}

	/**
	 * Sets the products combo box.
	 *
	 * @param productsCb the new products combo box
	 */
	public void setProductsCb(JComboBox<String> productsCb) {
		this.productsCb = productsCb;
	}

	/**
	 * Sets the customers combo box.
	 *
	 * @param customersCb the new customers combo box
	 */
	public void setCustomersCb(JComboBox<String> customersCb) {
		this.customersCb = customersCb;
	}

	/**
	 * Gets the button back.
	 *
	 * @return the button back
	 */
	public JButton getBtnBack() {
		return btnBack;
	}

	/**
	 * Sets the button back.
	 *
	 * @param btnBack the new button back
	 */
	public void setBtnBack(JButton btnBack) {
		this.btnBack = btnBack;
	}
}
